package com.tsxy.mall.service.impl;

import com.tsxy.mall.entity.Address;
import com.tsxy.mall.mapper.AddressMapper;
import com.tsxy.mall.service.AddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AddressServiceImpl implements AddressService {
    @Autowired
    private AddressMapper addressMapper;
    @Override
    public List getByUserId(Integer id) {
        addressMapper.getByUserId(id);
        return addressMapper.getByUserId(id);
    }

    @Override
    public List getAll() {
        return addressMapper.getAll();
    }

    @Override
    public Integer insert(Address address) {
        return addressMapper.insert(address);
    }
}
